package com.icbc.payfront.service.impl;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.icbc.payfront.data.QrCodeReq;
import com.icbc.payfront.data.QrCodeRet;
import com.icbc.payfront.service.QrCodeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;


@Service
public class QrCodeServiceImpl implements QrCodeService {
    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public Object rqCode(String jsonBody) {


        QrCodeReq qrCodeReq  =  JSONObject.parseObject(jsonBody, QrCodeReq.class);

        //转换并发送总行。

        //组织返回JSON。
        QrCodeRet qrCodeRet = new QrCodeRet();
        qrCodeRet.setBillNo(qrCodeReq.getBillNo());
        qrCodeRet.setMid(qrCodeReq.getMid());
        qrCodeRet.setBillDate(qrCodeReq.getBillDate());


        return qrCodeRet;
    }

    @Override
    public Object closeQRCode(String jsonBody) {

        return null;
    }

    @Override
    public Object query(String jsonBody) {
        return null;
    }

    @Override
    public Object refund(String jsonBody) {
        return null;
    }
}
